#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec3 aNormal;

out vec3 FragPos;
out vec3 Normal;
out vec3 Color;

uniform mat4 projection;
uniform mat4 view;
uniform vec4 posRadius;
uniform vec3 instanceColor;

void main()
{
    vec3 worldPos = aPos*posRadius.w;
    worldPos += posRadius.xyz;
    //vec3 worldPos(1,1,1);
    FragPos = worldPos;
    Normal = aNormal;
    Color = instanceColor;
    //Color = vec3(1,0,0);

    gl_Position = projection * view * vec4(worldPos, 1.0f);
}
